<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>用户注册</title>
<script src="__ROOT__/Public/Js/jquery-1.8.2.min.js"></script>
<style type="text/css">
html{
	background-color:#0CF;
	background:-webkit-gradient(linear, 0% 0%, 0% 100%,from(#09C), to(#0CF));
	background:-ms-linear-gradient(top, #fff,  #0000ff);
}
body{ font-family:'微软雅黑'; margin:0; padding:0;} input{font-family:'微软雅黑'}
.signup_wrap{
	width:270px; height:400px; margin:0px; padding:20px;
	background-color:#FFF; overflow:hidden; color:#369;
	border:#CCC 1px solid;
}
.signup_header{background-color:#FFF; color:#777; padding:25px 0 5px 0; text-align:left; font-size:13px; border-bottom:#BBB 1px solid;}
.signup_table td{height:30px; font-size:14px; color:#666;}

td a{color:#3CF; text-decoration:none;}

.textA{width:240px; height:33px; margin:0; padding:0 10px; border:#999 1px solid; border-radius:4px; font-family:'微软雅黑'}
.textA:focus{outline:none; border-color:#9CF; background-color:rgba(153,255,255,0.2); box-shadow:0px 0px 1px #99CCFF;}

.buttonA{
	width:260px; height:35px; border:0px; background-color:#09C; color:#FFF; 
	font-size:13px; margin:25px 0 10px 0; border-radius:4px; cursor:pointer;
}
.buttonA:hover{background-color:#1AD}
</style>
</head>

<body><center>
<div class="web_wrap">
<div class="signup_wrap">
	<div class="signup_header">Bug网站注册</div>
	<table class="signup_table" border="0" cellpadding="0" cellspacing="0">
	<form action="toSignUp" method="post" id="form_signup">
    <tr><td><b>用户名:</b></td></tr>
    <tr><td><input type="text" id="username" name="username" class="textA" placeholder="邮箱名"></td></tr>
    <tr><td><b>密码:</b></td></tr>
    <tr><td><input type="password" id="password" name="password" class="textA" placeholder="密码大于六位"></td></tr>
    <tr><td><b>密码:</b></td></tr>
    <tr><td><input type="password" id="passworda" name="password_1" class="textA" placeholder="密码大于六位"></td></tr>
    <tr><td><input type="button" id="signup_submit" value="注 册" class="buttonA"></td></tr>
    </form>
    </table>
    <div class="signup_footer"></div>
</div></div>
</center></body>
<script language="javascript">

$("body").css("height",$(window).height()+"px");
var height = ($(window).height()-$(".signup_wrap").height())/3;
$(".web_wrap").css("padding-top",height+"px");

$("#signup_submit").click(function(){
	var username	= $("#username").val();
	var password	= $("#password").val();
	var passworda	= $("#passworda").val();
	
	var mailForm	= /^[a-zA-Z0-9]+\@[a-zA-Z0-9]+\.[a-zA-Z0-9]+$/;
	if(!mailForm.test(username)){
		alert("抱歉，邮箱格式不正确，请检查!");
	}else if(username == ""||password == ""||passworda == ""){
		alert("请将信息填写完全!");
	}else if(password != passworda){
		alert("两次密码不一致，请检查!");
	}else if(password.length < 6){
		alert("抱歉，密码小于6位！");
	}else{
		$("#form_signup").submit();
	}
});
</script>
</html>
